package PTA3.ti3;

import java.util.Arrays;
import java.util.Scanner;
import java.util.*;

/**
 * @author Lenovo
 */



class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Rectangle[] rectangles = new Rectangle[2];
        for (int i = 0; i < 2; i++) {
            int width = sc.nextInt();
            int length = sc.nextInt();
            rectangles[i] = new Rectangle(width, length);
        }
        Circle[] circles = new Circle[2];
        for (int i = 0; i < 2; i++) {
            int radius = sc.nextInt();
            circles[i] = new Circle(radius);
        }
        int c = 0;
        for (int i = 0; i < rectangles.length; ++i) {
            Rectangle rectangle = rectangles[i];
            c += rectangle.getPerimeter();
        }
        for (int i = 0; i < circles.length; ++i) {
            Circle circle = circles[i];
            c += circle.getPerimeter();
        }
        int s = 0;
        for (int i = 0; i < rectangles.length; ++i) {
            Rectangle rectangle = rectangles[i];
            s += rectangle.getArea();
        }
        for (int i = 0; i < circles.length; ++i) {
            Circle circle = circles[i];
            s += circle.getArea();
        }
        System.out.println(c);
        System.out.println(s);
        System.out.println(Arrays.deepToString(rectangles));
        System.out.println(Arrays.deepToString(circles));
        sc.close();
    }
}

class Rectangle {
    private int width;
    private int length;

    public Rectangle(int width, int length) {
        this.width = width;
        this.length = length;
    }

    public int getPerimeter() {
        return 2 * (width + length);
    }

    public int getArea() {
        return width * length;
    }

    @Override
    public String toString() {
        return "Rectangle [width=" + width + ", length=" + length + "]";
    }
}

class Circle {
    private int radius;

    public Circle(int radius) {
        this.radius = radius;
    }

    public int getPerimeter() {
        return (int) (2 * Math.PI * radius);
    }

    public int getArea() {
        return (int) (Math.PI * radius * radius);
    }

    @Override
    public String toString() {
        return "Circle [radius=" + radius + "]";
    }
}